﻿CREATE TABLE [dbo].[Notification] (
    [Id]        UNIQUEIDENTIFIER NOT NULL,
    [UserId]    UNIQUEIDENTIFIER NOT NULL,
    [MessageId] UNIQUEIDENTIFIER NOT NULL,
    [Read]      BIT              NOT NULL,
    [Status]    INT              NOT NULL,
    [CreateAt]  DATETIME2 (3)    NOT NULL,
    CONSTRAINT [PK_Notification] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Notification_Message] FOREIGN KEY ([MessageId]) REFERENCES [dbo].[Message] ([Id]),
    CONSTRAINT [FK_Notification_User] FOREIGN KEY ([UserId]) REFERENCES [dbo].[User] ([Id])
);



